e6a8844d3abe63f95976c8f059a930343265eb96,1.7.10/src/main/java/net/geforcemods/securitycraft/gui/GuiCameraMonitor.java,GuiCameraMonitor,initGui,#,51

Before Change


		cameraButtons[8] = new GuiButton(9, this.width / 2 + 22, this.height / 2 + 10, 20, 20, "#");
		cameraButtons[9] = new GuiButton(10, this.width / 2 - 38, this.height / 2 + 40, 80, 20, "#");

		for(GuiButton button : cameraButtons) {
			button.displayString += (button.id + ((page - 1) * 10)); 
			this.buttonList.add(button);

			int camPos = (button.id + ((page - 1) * 10));
			if(camPos <= cameraMonitor.getCameraPositions(nbtTag).size()) {
				CameraView view = this.cameraMonitor.getCameraPositions(this.nbtTag).get(camPos - 1);

				if(view.dimension != Minecraft.getMinecraft().thePlayer.dimension) {
					hoverCheckers[button.id - 1] = new HoverChecker(button, 20);

After Change


		cameraButtons[8] = new GuiButton(9, this.width / 2 + 22, this.height / 2 + 10, 20, 20, "#");
		cameraButtons[9] = new GuiButton(10, this.width / 2 - 38, this.height / 2 + 40, 80, 20, "#");

		for(int i = 0; i < 10; i++) {
			GuiButton button = cameraButtons[i];
			int camID = (button.id + ((page - 1) * 10));
			ArrayList<CameraView> views = this.cameraMonitor.getCameraPositions(this.nbtTag);
			CameraView view;
			
			button.displayString += camID; 
			this.buttonList.add(button);

			if((view = views.get(camID - 1)) != null) {

				if(view.dimension != Minecraft.getMinecraft().thePlayer.dimension) {
					hoverCheckers[button.id - 1] = new HoverChecker(button, 20);
					cameraViewDim[button.id - 1] = view.dimension;
				}

				if(Minecraft.getMinecraft().theWorld.getBlock(view.x, view.y, view.z) != mod_SecurityCraft.securityCamera) {
					button.enabled = false;
					cameraTEs[button.id - 1] = null;
					continue;
				}
				
				cameraTEs[button.id - 1] = (TileEntitySCTE) Minecraft.getMinecraft().theWorld.getTileEntity(view.x, view.y, view.z);
				hoverCheckers[button.id - 1] = new HoverChecker(button, 20);
			}
			else
			{
				button.enabled = false;
				cameraTEs[button.id - 1] = null;
				continue;
			}
		}
		
		if(page == 1) {